﻿//using System;
//using System.Collections.Generic;
//using System.Text;
//using System.Web.UI.WebControls;
//using System.Web.UI;

//namespace TST.SharePointObjects
//{
//    public class CheckBoxColumn : ITemplate
//    {

//        /// <summary>
//        /// Constructor.
//        /// </summary>
//        /// <param name="boolFieldName">The field name of the boolean field.</param>
//        public CheckBoxColumn(string boolFieldName)
//        {
//        }

//        public void InstantiateIn(Control container)
//        {
//            if (container != null)
//            {
//                Literal literal = new Literal();
//                literal.ID = "selectObject";
//                literal.DataBinding += new EventHandler(literal_DataBinding);
//                container.Controls.Add(literal);
//            }
//        }

//        private void literal_DataBinding(object sender, EventArgs e)
//        {
//            Literal literal = (Literal)sender;
//            GridViewRow container = (GridViewRow)literal.NamingContainer;
//            SiteObject siteObject = (SiteObject)container.DataItem;
//            string check = siteObject.Index ? "Checked" : string.Empty;
//            literal.Text = string.Format("<input type=\"checkbox\" name=\"selectSiteObject{0}\" {1} />", siteObject.Id, check);
//        }

//    }
//}
